username='admin'
password='123456'
uname=input("请输入账号:")
pwd=input("请输入密码:")
#pwd==int(pwd)
for i in range(3):
    if i==2:
        print("输入超过3次，登录失败！")
        break
    if username==uname and password==pwd:
        print("登录成功")
        break
    elif username!=uname and password==pwd:
        print("name:",uname,"pwd:",pwd)
        print("账号错误请重新输入！")
        uname=input("请输入账号：")
    elif username==uname and password!=pwd:
        print("name:",uname,"pwd:",pwd)
        print("密码错误请重新输入！")
        pwd=input("请输入密码：")
    #elif uname.isspace()==True or pwd.isspace()==True:
    elif uname.strip()=='' or pwd.strip=='':
        print("不能为空！")
        break
    else:
        print("登录失败！")
        break

